import request from "@/utils/request"


const selectAddressMessage = (id) => {
    return request({
        url: `/api/address/findByUserId/${id}`,
        headers: { "Content-Type": "application/json;charset=utf-8" },
        method: "get"
    })
}
const addAddressMessage = (data) => {
    return request({
        url: "/api/address/add",
        method: "post",
        headers: { "Content-Type": "application/json;charset=utf-8" },
        data
    })
}
const deleteAddressMessage = (id) => {
    return request({
        url: `/api/address/delete/${id}`,
        headers: { "Content-Type": "application/json;charset=utf-8" },
        method: "delete"
    })
}
const updateAddressMessage = (data) => {
    return request({
        url: "/api/address/update",
        method: "post",
        headers: { "Content-Type": "application/json;charset=utf-8" },
        data
    })
}
export { selectAddressMessage, addAddressMessage, updateAddressMessage, deleteAddressMessage }
